<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const obj1 = { a: 1, b: 2, c: 3 };
      const obj2 = { f: 1, d: 2, e: 3 };
      // const obj3 = JSON.parse(JSON.stringify(obj1));
      const obj3 = {};

      Object.assign(obj3, obj1, obj2); //concat
      // for (let k in obj1) {
      //   obj3['a'] = 1;
      //   obj3[k] = obj1[k];
      // }
      console.log(obj3);
    </script>
  </body>
</html>
